package com.yu.rpc.core.proxy;

import java.lang.reflect.Proxy;

public class ServiceProxyFactory {
    public static <T> T getProxy(Class<T> clazz) {
        try {
            return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class[]{clazz}, new ServiceProxy());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
